﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;
using DAL;

namespace BLL
{
    public class ChuyenKhauBLL
    {
        public static List<ChuyenKhauPublic> LoadChuyenKhauBySoCK(int SoChuyenKhau)
        {
            return ChuyenKhauDAL.LoadChuyenKhauBySoCK(SoChuyenKhau);
        }
        public static List<ChuyenKhauPublic> LoadChuyenDenBySoCK(int SoChuyenKhau)
        {
            return ChuyenKhauDAL.LoadChuyenDenBySoCK(SoChuyenKhau);
        }
        public static List<ChuyenKhauPublic> LoadChuyenKhauByMaNK(int MaNK)
        {
            return ChuyenKhauDAL.LoadChuyenKhauByMaNK(MaNK);
        }
        public static int LoadMaCK()
        {
            return ChuyenKhauDAL.LoadMaCK();
        }
        //public static int LoadMaCDen(int MaPX)
        //{
        //    return ChuyenKhauDAL.LoadMaCDen(MaPX);
        //}
        public static void InsertChuyenKhau(ChuyenKhauPublic ck)
        {
            ChuyenKhauDAL.InsertChuyenDen(ck);
        }
        public static int LoadSoChuyenKhau()
        {
            return ChuyenKhauDAL.LoadSoChuyenKhau();
        }
        public static int CountChuyenDenByYear(int firstyear, int lastyear)
        {
            return ChuyenKhauDAL.CountChuyenDenByYear(firstyear, lastyear);
        }
        public static int CountChuyenDiByYear(int firstyear, int lastyear)
        {
            return ChuyenKhauDAL.CountChuyenDiByYear(firstyear, lastyear);
        }
        public static int CountChuyenDinByYear(int firstyear, int lastyear)
        {
            return ChuyenKhauDAL.CountChuyenDinByYear(firstyear, lastyear);
        }
        public static void UpdateChuyenDen(int SoChuyenKhau, byte MaQH, string ChuHo,string ThuongTru, string LyDoChuyen, DateTime NgayCap, string NguoiCap, byte ChucVu, int NoiCap, string NguoiNhan, byte ChucVuNguoiNhan, int MaCK)
        {
            ChuyenKhauDAL.UpdateChuyenDen(SoChuyenKhau, MaQH,ChuHo, ThuongTru, LyDoChuyen, NgayCap, NguoiCap, ChucVu, NoiCap, NguoiNhan, ChucVuNguoiNhan, MaCK);
        }
        public static void UpdateChuyenDi(byte MaQH, string ChuHo, int NoiChuyen, string LyDoChuyen, string NguoiCap, byte ChucVu,string NguoiNhan, byte ChucVuNguoiNhan, int MaCK)
        {
            ChuyenKhauDAL.UpdateChuyenDi(MaQH, ChuHo, NoiChuyen, LyDoChuyen, NguoiCap,ChucVu,NguoiNhan,ChucVuNguoiNhan, MaCK);
        }
        public static void DeleteChuyenKhau(int MaCK)
        {
            ChuyenKhauDAL.DeleteChuyenKhau(MaCK);
        }
        public static void DeleteChuyenKhauNK(int MaNK)
        {
            ChuyenKhauDAL.DeleteChuyenKhauNK(MaNK);
        }
        public static bool TestChuyenKhau(int MaNK)
        {
            return ChuyenKhauDAL.TestChuyenKhau(MaNK);
        }

        public static int CountChuyenKhauNKByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKNuByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKNuByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNK14ByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNK14ByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKTinhByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKTinhByDay(batdau,kethuc);
        }
        public static int CountChuyenKhauNKTinhNuByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKTinhNuByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKTinh14ByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKTinh14ByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKHuyenByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKHuyenByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKHuyenNuByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKHuyenNuByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKHuyen14ByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKHuyen14ByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKXaByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKXaByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKXaNuByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKXaNuByDay(batdau, kethuc);
        }
        public static int CountChuyenKhauNKXa14ByDay(DateTime batdau, DateTime kethuc)
        {
            return ChuyenKhauDAL.CountChuyenKhauNKXa14ByDay(batdau, kethuc);
        }

        public static int CountTachKhauByDay(DateTime batdau, DateTime ketthuc)
        {
            return ChuyenKhauDAL.CountTachKhauByDay(batdau, ketthuc);
        }
        public static int CountCKNgoaiTinhByDay(DateTime batdau, DateTime ketthuc)
        {
            return ChuyenKhauDAL.CountCKNgoaiTinhByDay(batdau, ketthuc);
        }
        public static int CountSoCKByDay(DateTime batdau, DateTime ketthuc)
        {
            return ChuyenKhauDAL.CountSoCKByDay(batdau, ketthuc);
        }
        public static int CountChuyenDiByDay(DateTime batdau, DateTime ketthuc)
        {
            return ChuyenKhauDAL.CountChuyenDiByDay(batdau, ketthuc);
        }
        public static ChuyenKhauPublic TimChuyenKhau(int SoChuyenKhau, string tenserver, string tendata)
        {
            return ChuyenKhauDAL.TimChuyenKhau(SoChuyenKhau, tenserver, tendata);
        }
    }
}
